	
	<script type="text/javascript" src="JO_jquery/jquery-1.4.1.min.js"></script>
		<script type="text/javascript" src="JO_jquery/ui/jquery-ui-1.8.9.custom.js"></script>

    	<script>
		   $(function() {
				$( "#SO_start" ).datepicker({dateFormat: 'yy-mm-dd'});
			});
		</script> 		

	<?php 

	$path="C:/xampp/htdocs/00_JO/JOi/";
    require($path.'JO_02_function.php');
    require ($path.'DataProvider/DataProvider.php');
	include ($path.'controller/SO_recommendation_Controller.php'); 
	
	$chude=isset($_GET['SO_chude'])?$_GET['SO_chude']:"''";
	
?>
	


 
<div style="position:absolute;top:4px;right:8px;cursor:pointer" onclick="JO_display2('JO_popup');JO_display2('JO_popupsub');location.reload(true);"><img src="JO_images/fileclose.ico" width="20px"/></div>
<div style="width:430px;">
     <h2 style="width:100%;text-align:center;margin-top:24px">
    <?=isset( $_GET[ "chude" ])?"Edit List":"Add List"?>
  </h2>
      <iframe
			id		= 'JO_integration_asynchronous'
			name	= 'JO_integration_asynchronous'
			style	= "
				width:0px;
                height:0px;
                border:none
			"
		></iframe>
        
        <?php
        $result_recommendations=SO_12_recommendation_getupdate($chude);
		if($result_recommendations->num_rows)
		if($result_recommendations!=NULL)
		$result_recommendation=$result_recommendations->fetch_array();
		?>
       
      <form method="post" action="controller/JO_navigation.php" onsubmit="return FcheckFormTD(this);" name="f" id="f">
    <table class="JO_tbi" style="border:none">
          <input 
						type	= "hidden" 
						id		= "SO_query"
						name	= "SO_query"
						value	= "<?=(isset($_GET['SO_chude'])?"recommendation_update":"recommendation_insert")  ?>"
	>
          <input 
						type	= "hidden" 
						id		= "SO_controller"
						name	= "SO_controller"
						value	= "SO_recommendation_Controller"
	>
          <input 
						type	= "hidden" 
						id		= "SO_chude"
						name	= "SO_chude"
						value	= "<?=$chude?>"
	>
          <input 
						type	= "hidden" 
						id		= "SO_id"
						name	= "SO_id"
						<?php
							if(!isset($_GET["SO_chude"]))
								echo "value	= \"".((isset($_GET["SO_chude"]))?$_GET["SO_chude"]:"")."\"";
							else
								echo "value	= \"0\"";
						?>
					>
          <tr>
        <th> Type </th>
        <td><select class="input_text" style="width:346px;color:#000" id="SO_type" name="SO_type">
            <?php 
		$result_type=SO_12_get_type();
		if($result_type->num_rows)
		while($result_types=$result_type->fetch_array()){
				 ?>
            <option  value="<?=$result_types['key']?>">
            <?=$result_types['subject']?>
            </option>
            <?php }?>
          </select></td>
      </tr>
          <tr>
        <th>Subject</th>
        <td><input type="text" name="SO_subject" id="SO_subject" style="width:342px;color:#000" class="input_text" value="<?=JO_UNconvertHTMLentities(isset($result_recommendation['subject'])?$result_recommendation['subject']:"")?>" /></td>
      </tr>
          <tr>
        <th>Descripttion </th>
        <td><textarea name="SO_description" id="SO_description" style="width:342px;color:#000 " class="input_text" ><?=JO_UNconvertHTMLentities(isset($result_recommendation['description'])?$result_recommendation['description']:"")?>
</textarea></td>
      </tr>
          <tr>
        <th> Amount </th>
        <td><input type="text" name="SO_amount" id="SO_amount" style="width:342px;color:#000 " class="input_text"  value="<?=JO_UNconvertHTMLentities(isset($result_recommendation['amount'])?$result_recommendation['amount']:"")?>" /></td>
      </tr>
    	  <tr>
        <th> Start_date </th>
        <td><span class="demo"><input type="text" name="SO_start"  style="width:342px;color:#000" class="input_text" id="SO_start" value="<?=JO_UNconvertHTMLentities(isset($result_recommendation['start_date'])?$result_recommendation['start_date']:"")?>" /></span></td>      </tr>
          <tr>
        <th> Expired_date </th>
        <td><input type="text" name="SO_expired" style="width:342px;color:#000" class="input_text" id="SO_expired"   value="<?=JO_UNconvertHTMLentities(isset($result_recommendation['expired_date'])?$result_recommendation['expired_date']:"")?>" /></td>      </tr>
          <tr>
        <th> note </th>
        <td><input type="text" name="SO_note" id="SO_note" style="width:342px;color:#000" class="input_text"  	 value="<?=JO_UNconvertHTMLentities(isset($result_recommendation['note'])?$result_recommendation['note']:"")?>" /></td>
      </tr>
          <tr>
        <th></th>
        <td colspan="2" style="padding:0 !important;width:100%"><input type="submit" value="<?=(isset($_GET['SO_chude'])?"update":"insert")  ?>" style="width:349px;height:24px;" class="input_text" ></td>
      </tr>
      
        </table>
  </form>
    
